﻿package cn.antscript.airCMS.data 
{
	import cn.antscript.airCMS.data.singleData.TextData;
	/**
	 * ...
	 * @author 
	 */
	public class TextsData implements IGroupBtn
	{
		public var allowDel:Boolean;
		public var container:Vector.<TextData>;
		public var label:String;
		public function TextsData(xml:XML) 
		{
			//<texts label="" allowDel="">
					//<text label="" txt="" timestamp="" />
					//<text label="" txt="" timestamp="" />
				//</texts>
				
			allowDel = String(xml.@allowDel) == "1";
			label = String(xml.@label);
			var data:TextData;
			container = new Vector.<TextData>();
			for (var i:int = 0; i < xml.text.length(); i++) 
			{
				data = new TextData(	String(xml.text[i].@id),
										String(xml.text[i].@label),
										String(xml.text[i].@content),
										String(xml.text[i].@timestamp));
										
				container.push(data);
			}
			
			
		}
		
	}

}